package org.hgvc.webapp.ets.spring.service;

import java.util.Date;
import java.util.List;

import org.hgvc.webapp.ets.bo.Agent;
import org.hgvc.webapp.ets.bo.Agreement;
import org.hgvc.webapp.ets.bo.Guest;
import org.hgvc.webapp.ets.bo.Member;
import org.hgvc.webapp.ets.bo.Voucher;
import org.hgvc.webapp.ets.bo.VoucherEntry;
import org.hgvc.webapp.ets.bo.VoucherEntryDetail;
import org.hgvc.webapp.ets.jsf.beans.voucher.VoucherBean;
import org.jocsb.base.bo.Role;
import org.jocsb.base.bo.User;
import org.jocsb.base.exception.BaseException;


public interface VoucherService {
	public String generateVoucher(Voucher voucherParam,Integer vouchersQty)throws BaseException;
	public void voucherAssignment(Agent agent,Voucher startVoucher,Voucher lastVoucher)throws BaseException;
	public void voucherAssignment(User hgvcUser,Voucher startVoucher,Voucher lastVoucher)throws BaseException;
	public void voucherUnassignment(Agent agent,Voucher startVoucher,Voucher lastVoucher)throws BaseException;
	public void voucherUnassignment(User hgvcUser,Voucher startVoucher,Voucher lastVoucher)throws BaseException;
	public List<Voucher> getVoucherUnassignList()throws BaseException;
	public List<Agent> getAgentApprovedList()throws BaseException;
	public List<User> getUserListByRole(Role role)throws BaseException;
	public List<Voucher> getVoucherAssignedListByAgent(Agent agent)throws BaseException;
	public List<Voucher> getVoucherAssignedListByUser(User user)throws BaseException;
	public List<VoucherBean> getVoucherReportList(String voucherNo,Date effectiveDate,Date expiryDate)throws BaseException;
	
	public Guest getGuestByIcNo(String icNo)throws BaseException;
	public VoucherEntry getVoucherEntryByAgreement(Agreement agreement)throws BaseException;
	public VoucherEntry getVoucherEntryByProspect(Member prospect)throws BaseException;
	public VoucherEntry getVoucherEntryByGuest(Guest guest)throws BaseException;
	public List<VoucherEntryDetail> getVoucherEntryDetailList(VoucherEntry voucherEntry)throws BaseException;
	public VoucherEntry saveVoucherEntry(String entryType,VoucherEntry voucherEntryParam,VoucherEntryDetail voucherEntryDetail)throws BaseException;
	
	public List<Voucher> getVoucherAvailableListByUser(User user)throws BaseException;
	public void removeVoucherEntry(List<VoucherEntryDetail> deleteList)throws BaseException;
	public List<VoucherBean> getComplimentaryAccommVoucherList(Voucher voucher)throws BaseException;
	public List<Voucher> getVoucherListSellByUser(User user)throws BaseException;
	
	public List<VoucherEntryDetail> getVoucherEntryDetailList()throws BaseException;
	public List<VoucherEntryDetail> getVoucherEntryDetailAvailableList()throws BaseException;
}
